<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once BASE_PATH.'application/controllers/base'.EXT;

class Home extends Base {
	
       public function __construct()
       {
	      parent::__construct();
	      $this->load->model("cursodao");
	      $this->load->model("eventodao");
       }
       
       
	public function index()
	{
	      $cursos = $this->cursodao->getLastItems(array("limit"=>array(0,4)),"dia");
	      $eventos = $this->eventodao->getLastItems(array("limit"=>array(0,4)),"f_inicio");
	      
	      $data = array(
			    "title"  	  => "HOME",
			    "subtitle" 	  => "",
			    "description" => "",
			    "keywords" 	  => "",
			    
			    "cursos"	  => $cursos,
			    "eventos"	  => $eventos
			    );
	      $this->load->view('home/home',$data);
	}
}